import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { GroupBuyPriceListHelper } from "./GroupBuyPriceListHelper";
import { GroupBuyRewardListHelper } from "./GroupBuyRewardListHelper";
type int = number;
//class SGroupBuy
    
    export  class SGroupBuy
    {
       

        public __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.itemCode);
            arg1.writeInt(this.price);
            arg1.writeInt(this.unit);
            arg1.writeInt(this.needPlayerNum);
            arg1.writeInt(this.playerNum);
            arg1.writeInt(this.buyNum);
            GroupBuyPriceListHelper.write(arg1, this.priceList);
            GroupBuyRewardListHelper.write(arg1, this.rewardList);
            return;
        }

        public __read(arg1: SerializeStream): void
        {
            this.itemCode = arg1.readInt();
            this.price = arg1.readInt();
            this.unit = arg1.readInt();
            this.needPlayerNum = arg1.readInt();
            this.playerNum = arg1.readInt();
            this.buyNum = arg1.readInt();
            this.priceList = GroupBuyPriceListHelper.read(arg1);
            this.rewardList = GroupBuyRewardListHelper.read(arg1);
            return;
        }

        public /* var */itemCode: int;

        public /* var */price: int;

        public /* var */unit: int;

        public /* var */needPlayerNum: int;

        public /* var */playerNum: int;

        public /* var */buyNum: int;

        public /* var */priceList: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */rewardList: Map<any, any> /* flash.utils.Dictionary */;
    }
